package com.openget.lang;

import com.openget.util.*;

public class PageElement extends ElementModel implements IStrategyElement, IMultiplicationElement {

	@Override
	public void implementation(OpengetContext context) {
		//ArrayList<String> urls = new ArrayList<String>();
		//context.getRunning().put("urls", urls);
	}

	@Override
	public void multiplyAsync(final OpengetContext context, final IDelegate<OpengetContext[]> callback) {		
		new HttpElement(this.getSourceElement()).call(context, new IDelegate<byte[]>() {
			public void invoke(byte[] content) {
				callback.invoke(new OpengetContext[] { new OpengetContext(context, content) });
			}
		});
	}

	@Override
	public OpengetContext[] multiply(OpengetContext context) {
		return null;
	}
}
